package server

import (
	"github.com/1141520944/go-library/library/log"
	"github.com/gin-gonic/gin"
	"learn/k8s/internal/pkg/data"
)

type Handler struct {
	data *data.Data
	l    *log.Logger
}

func NewHandler(db *data.Data, l *log.Logger, e *gin.Engine) *Handler {
	c := &Handler{data: db, l: l}
	return c
}
func (h *Handler) Router(e *gin.Engine) {
	server := e.Group("k8s")
	{
		server.GET("/listPod", h.podList)
		server.GET("/namespace", h.nameSpaceList)
	}
}
